package tableViewBinding;

import javafx.beans.property.SimpleIntegerProperty;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;

public class Person {

    private final SimpleIntegerProperty num;
    private final SimpleStringProperty firstName;
    private final SimpleStringProperty lastName;
    

    public Person(int id, String fName, String lName) {
      this.firstName = new SimpleStringProperty(fName);
      this.lastName = new SimpleStringProperty(lName);
      this.num = new SimpleIntegerProperty(id);
    }


    public StringProperty firstNameProperty() {
      return firstName ;
    }
    
    public String getFirstName() {
      return firstName.get();
    }

    public void setFirstName(String fName) {
      firstName.set(fName);
    }
    
    public StringProperty lastNameProperty() {
      return lastName ;
    }

    public String getLastName() {
      return lastName.get();
    }

    public void setLastName(String fName) {
      lastName.set(fName);
    }

    public int getId() {
      return num.get();
    }

    public void setId(int id) {
      num.set(id);
    }

  }